import { defAxios as request } from '@/utils/http'

/**
 * 航段列表
 * @returns
 */
export const getSectionInformation = data => request({
  url: '/leg/getList',
  method: 'GET',
  data
})

/**
 * 航段 - 分页
 * @returns
 */
export const getSectionIndex = params => request({
  url: '/leg/index',
  method: 'GET',
  params
})

/**
 * 新增航段
 * @param {*} params
 * @returns
 */
export const sectionAdd = data => request({
  url: '/leg/add',
  method: 'POST',
  data
})

/**
 * 删除航段
 * @param {*} params
 * @returns
 */
export const sectionDel = params => request({
  url: `/leg/delete/${params}`,
  method: 'DELETE'
})

/**
 * 编辑航段
 * @param {*} params
 * @returns
 */
export const sectionEdit = data => request({
  url: '/leg/edit',
  method: 'PUT',
  data
})

